package org.haredot.config;

import org.haredot.entity.ServiceLog;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

@ConfigurationProperties(prefix = "log.server")
public class ServiceLogType {
    /**
     * 记录日志的请求类型
     */
    private List<Type> types = List.of(Type.GET, Type.PUT, Type.DELETE , Type.POST, Type.OPTIONS);
    /**
     * 是否记录 响应的结果
     */
    private boolean result = true;

    public void setTypes(List<Type> types) {
        this.types = types ;
    }

    public List<Type> getTypes() {
        return types ;
    }

    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public static enum Type {
        GET, PUT, DELETE , POST, OPTIONS ;
    }
}
